# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Eric Belanger <eric@archlinux.org>

pkgname=bison
pkgver=3.8.1
pkgrel=1
pkgdesc="The GNU general-purpose parser generator"
arch=('x86_64')
license=('GPL3')
url="https://www.gnu.org/software/bison/bison.html"
depends=('glibc' 'm4' 'sh')
groups=('base-devel')
source=("https://ftp.gnu.org/gnu/bison/${pkgname}-${pkgver}.tar.xz"{,.sig})
sha512sums=('f87978c41eca4db22de4f64feb3be92e44862d412f75dd84980045faf0f9e7f5a41b25bef8d4acd90743638eab61a7ac111444969d958fef5fe3535bac416921'
            'SKIP')
validpgpkeys=('7DF84374B1EE1F9764BBE25D0DDCAA3278D5264E')  # Akim Demaille

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  ./configure --prefix=/usr --datadir=/usr/share
  make
}

check() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make check
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
